<?php
class IndexController extends  Controller{
	
	public function __construct(){
		parent::__construct($this);
	}
	
	public function validateIndexAction(){
		echo'This is IndexAction validation function!<br/>';
		return true;
	}
	public function indexAction(){
		
		//$this->getUser()->setAuthenticated(true);
		//$this->getUser()->addCredential('test');
		//$this->getUser()->removeAllCredential();
		//$this->getUser()->setAuthenticated(false);
		echo'认证？';var_dump($this->getUser()->getAuthenticated());
		echo'TEST证书:';var_dump($this->getUser()->hasCredential('test'));
		//F::M('');
		//$mods = Functions::M('page.job');
		//echo W('edit');
		//var_dump($mod);exit;
		//$mod->get();
		//$mod->show_sql =true;
		//$mod->autoLessen('id',2);
		//$rs = $mod->insert(array('id'=>12, 'name'=>'test1'));
		//$rs = $mod->where(array('id'=>12))->remove();
		//$mod->where(array('id'=>12))->update(array('name'=>11111));
		
		//$rs = Functions::M('page.job')->getPage(2);
		$rs = $this->getModel('page.user')->getPage(1);
		//print_r($rs);
		$this->redirectIsFalse($rs, 'test', array('a'=>'123'));
		$this->forwardIsTrue($rs, array($this,'testAction'));
		
		echo '2213123';
		
	}
	
	
	public function testAction(){
		echo' testAction';
		//$this->show();
	}
	
	

}
?>